Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Default currency symbol #259

Merged
merged 2 commits into from
Dec 7, 2024

Conversation

sebiweise
Copy link
Contributor

@sebiweise sebiweise commented Oct 24, 2024

In this PR I´ve added a env parameter that can be used to define a default currency symbol on group creation. The symbol can still be changed on creation by inserting another symbol into the input field.

The following variables were added:

VAR name Default Description
NEXT_PUBLIC_DEFAULT_CURRENCY_SYMBOL none This parameter can be used to define a default currency symbol that will be used on group creation.

ToDo:
Currently the env var is defined directly via currency: process.env.NEXT_PUBLIC_DEFAULT_CURRENCY_SYMBOL || '', and not via the env.ts file. It is working fine, but we are missing the validation of zod. I wasn´t able to define the variable via the env.ts file, because some of the vars are missing on the clientside. Maybe we will have to seperate this config file or is there any other solution of doing this?

@sebiweise
Copy link
Contributor Author

Maybe we could use this example to implement client, server and runtime based env validation?
https://github.com/lukevella/rallly/blob/9bbd8e0790ca0ded029ff565c9ca3cb73791fae1/apps/web/src/env.ts

@scastiel
Copy link
Member

scastiel commented Dec 7, 2024

Nice, thanks @sebiweise!

@scastiel scastiel merged commit 5111f35 into spliit-app:main Dec 7, 2024
@sebiweise sebiweise deleted the feature/default_currency_symbol branch December 7, 2024 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants